"use strict";
const common_vendor = require("../../common/vendor.js");
const __unplugin_components_1 = () => "../../node-modules/wot-design-uni/components/wd-button/wd-button.js";
const __unplugin_components_0 = () => "../../node-modules/wot-design-uni/components/wd-icon/wd-icon.js";
if (!Array) {
  const _component_wd_icon = __unplugin_components_0;
  const _component_wd_button = __unplugin_components_1;
  const _component_layout_default_uni = common_vendor.resolveComponent("layout-default-uni");
  (_component_wd_icon + _component_wd_button + _component_layout_default_uni)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
  __name: "result",
  setup(__props) {
    const beautyResult = common_vendor.ref({
      score: 70,
      confidence: 89,
      type: "阳光活力型",
      typeDescription: "阳光活力型的人通常拥有充满活力的面部表情，五官轮廓分明，给人一种积极向上、充满朝气的感觉。这种类型的颜值具有很强的感染力，能够给周围的人带来正能量。",
      faceShape: "您的脸型属于圆形脸，面部轮廓线条圆润，下巴较短且圆润，整体面部宽度与长度较为接近，没有明显的棱角。",
      detailedAnalysis: {
        facialSymmetry: 75,
        skinQuality: 70,
        facialFeatures: [
          { name: "眼睛", score: 78, description: "眼睛形状较为标准，眼神温和，但因眼袋明显，视觉上稍有影响。" },
          { name: "鼻子", score: 72, description: "鼻梁高度适中，鼻翼宽度与面部比例协调，整体较为端正。" },
          { name: "嘴巴", score: 75, description: "嘴巴大小适中，唇形较为自然，闭合状态下线条流畅。" },
          { name: "眉毛", score: 68, description: "眉毛形状自然，与眼睛间距适中，颜色与头发协调。" },
          { name: "脸型", score: 65, description: "圆形脸，面部圆润，给人亲切之感，但缺乏立体感。" }
        ],
        overallImpression: "整体而言，您的面部特征协调自然，给人亲切友好的印象。虽然在某些细节上有提升空间，但您的整体气质非常适合亲和力强的形象定位。"
      },
      advantages: [
        "面部整体协调，没有明显缺陷",
        "眼神温和，给人亲切感",
        "面部肌肤状态良好",
        "整体气质阳光积极"
      ],
      suggestions: [
        "可以通过修容增强面部立体感",
        "注意眼部护理，减轻眼袋问题",
        "尝试不同的眉形，提升面部整体表现力"
      ],
      quote: "美是一种态度，与年龄无关。",
      author: "可可·香奈儿"
    });
    common_vendor.onLoad((options) => {
      if (options.result) {
        try {
          const result = JSON.parse(decodeURIComponent(options.result));
          common_vendor.nextTick$1(() => {
            beautyResult.value = { ...result };
            // console.log("更新后的结果:", beautyResult.value);
          });
        } catch (error) {
          console.error("解析结果失败:", error);
          common_vendor.index.showToast({
            title: "数据加载失败",
            icon: "error"
          });
        }
      }
    });
    common_vendor.watch(beautyResult, (newValue) => {
      // console.log("beautyResult发生变化:", newValue);
    });
    function navigateBack() {
      common_vendor.index.navigateBack();
    }
    function reTest() {
      common_vendor.index.switchTab({
        url: '/pages/beauty-test/index'
      });
    }
    function backToHome() {
      common_vendor.index.switchTab({
        url: '/pages/index/index'
      });
    }
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.p({
          name: "arrow-left",
          size: "20px"
        }),
        b: common_vendor.o(navigateBack),
        c: common_vendor.t(beautyResult.value.score),
        d: beautyResult.value.confidence
      }, beautyResult.value.confidence ? {
        e: common_vendor.t(beautyResult.value.confidence)
      } : {}, {
        f: common_vendor.p({
          name: "user",
          size: "20px",
          color: "#409EFF"
        }),
        g: common_vendor.t(beautyResult.value.type),
        h: common_vendor.t(beautyResult.value.typeDescription),
        i: beautyResult.value.faceShape
      }, beautyResult.value.faceShape ? {
        j: common_vendor.p({
          name: "id-card",
          size: "20px",
          color: "#67C23A"
        }),
        k: common_vendor.t(beautyResult.value.faceShape)
      } : {}, {
        l: beautyResult.value.detailedAnalysis
      }, beautyResult.value.detailedAnalysis ? common_vendor.e({
        m: common_vendor.p({
          name: "chart-pie",
          size: "20px",
          color: "#F56C6C"
        }),
        n: beautyResult.value.detailedAnalysis.facialSymmetry
      }, beautyResult.value.detailedAnalysis.facialSymmetry ? {
        o: common_vendor.t(beautyResult.value.detailedAnalysis.facialSymmetry)
      } : {}, {
        p: beautyResult.value.detailedAnalysis.skinQuality
      }, beautyResult.value.detailedAnalysis.skinQuality ? {
        q: common_vendor.t(beautyResult.value.detailedAnalysis.skinQuality)
      } : {}, {
        r: beautyResult.value.detailedAnalysis.facialFeatures && beautyResult.value.detailedAnalysis.facialFeatures.length > 0
      }, beautyResult.value.detailedAnalysis.facialFeatures && beautyResult.value.detailedAnalysis.facialFeatures.length > 0 ? {
        s: common_vendor.f(beautyResult.value.detailedAnalysis.facialFeatures, (feature, index, i0) => {
          return {
            a: common_vendor.t(feature.name),
            b: common_vendor.t(feature.score),
            c: common_vendor.t(feature.description),
            d: index
          };
        })
      } : {}, {
        t: beautyResult.value.detailedAnalysis.overallImpression
      }, beautyResult.value.detailedAnalysis.overallImpression ? {
        v: common_vendor.t(beautyResult.value.detailedAnalysis.overallImpression)
      } : {}) : {}, {
        w: beautyResult.value.advantages && beautyResult.value.advantages.length > 0
      }, beautyResult.value.advantages && beautyResult.value.advantages.length > 0 ? {
        x: common_vendor.p({
          name: "thumbs-up",
          size: "20px",
          color: "#FF9800"
        }),
        y: common_vendor.f(beautyResult.value.advantages, (advantage, index, i0) => {
          return {
            a: "96fe327d-6-" + i0 + ",96fe327d-0",
            b: common_vendor.t(advantage),
            c: index
          };
        }),
        z: common_vendor.p({
          name: "circle-check",
          size: "16px",
          color: "#67C23A"
        })
      } : {}, {
        A: beautyResult.value.suggestions && beautyResult.value.suggestions.length > 0
      }, beautyResult.value.suggestions && beautyResult.value.suggestions.length > 0 ? {
        B: common_vendor.p({
          name: "lightbulb",
          size: "20px",
          color: "#F56C6C"
        }),
        C: common_vendor.f(beautyResult.value.suggestions, (suggestion, index, i0) => {
          return {
            a: "96fe327d-8-" + i0 + ",96fe327d-0",
            b: common_vendor.t(suggestion),
            c: index
          };
        }),
        D: common_vendor.p({
          name: "arrow-right",
          size: "16px",
          color: "#409EFF"
        })
      } : {}, {
        E: beautyResult.value.quote
      }, beautyResult.value.quote ? {
        F: common_vendor.t(beautyResult.value.quote),
        G: common_vendor.t(beautyResult.value.author)
      } : {}, {
        H: common_vendor.o(reTest),
        I: common_vendor.p({
          type: "primary"
        }),
        J: common_vendor.o(backToHome),
        K: common_vendor.p({
          type: "default"
        })
      });
    };
  }
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-96fe327d"]]);
wx.createPage(MiniProgramPage);
